import {hrAjax as proFetch} from 'src/hrpub/common/utils/utils';

export default {
    name: 'main',
    data: {
        language: {}, // 多语
        context: {},
        orgValue: {},
        isEdit: false,
        tabKey: 'entry',
        handleItem: {},
        approveMap: {},
        disEditMap: {},
        gridMap: {},
        infosetArray: [],
        orignalTemplate: []
    },
    sync: {
        update(state, payload) {
            return {
                ...state,
                ...payload
            };
        }
    },
    async: {
        //获取配置信息
        getConfig(dispatch, getState, payload) {
            return proFetch({
                url: '/nccloud/hrtrn/psninfoconf/PsninfoConfQueryAction.do',
                body: payload
            });
        },
        //保存配置信息
        saveConfig(dispatch, getState, payload) {
            return proFetch({
                url: '/nccloud/hrtrn/psninfoconf/PsninfoConfSaveAction.do',
                body: payload
            });
        },
        //复制
        copy(dispatch, getState, payload) {
            return proFetch({
                url: '/nccloud/hrtrn/psninfoconf/PsninfoConfCopyAction.do',
                body: payload
            });
        }
    }
};